#pragma once

#include<stdio.h>
#include<stdlib.h>
#include<assert.h>

typedef int DListDataType;

typedef struct DList
{
	struct DList* next;
	struct DList* prev;
	DListDataType val;
}DList;


DList* DListInit();

void DListPrint(DList* phead);

void DListDestroy(DList* pphead);

void DListPushBack(DList* phead, DListDataType x);

void DListPopBack(DList* phead);

void DListPushFront(DList* phead, DListDataType x);

void DListPopFront(DList* phead);

DList* DListFind(DList* phead, DListDataType x);

void DListInsert(DList* pos, DListDataType x);

void DListErase(DList* pos);
